from django.db import models

class ManipulateConcept(models.Model):
    """
    数据模型：ManipulateConcept
    数据表名称：zhen_manipulate_concept
    """
    category = models.CharField(max_length=100, verbose_name="类别")
    concept_name = models.CharField(max_length=100, verbose_name="概念名称")
    concept_description = models.TextField(verbose_name="概念描述")
    essay_title = models.CharField(max_length=100, verbose_name="文章标题",default='')
    created_at = models.DateTimeField(auto_now_add=True, verbose_name="创建日期")

    class Meta:
        db_table = 'zhen_manipulate_concept'
        verbose_name = 'ManipulateConcept'
        verbose_name_plural = 'ManipulateConcepts'

    def __str__(self):
        return self.concept_name
    

class ManipulateEssay(models.Model):
    """
    数据模型：ManipulateEssay
    数据表名称：zhen_manipulate_essay
    """
    source = models.CharField(max_length=100, verbose_name="来源")
    title = models.CharField(max_length=100, verbose_name="标题",unique=True)
    full_text = models.TextField(verbose_name="内容")
    created_at = models.DateTimeField(auto_now_add=True, verbose_name="创建日期")

    class Meta:
        db_table = 'zhen_manipulate_essay'
        verbose_name = 'ManipulateEssay'
        verbose_name_plural = 'ManipulateEssays'    
        
    def __str__(self):
        return self.title